const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DWshPLuy3RQbKF.js","assets/DAXXjFlN13g7BR.js","assets/jNKBM5mL2ETCfV.js"])))=>i.map(i=>d[i]);
import{o as e}from"./DAXXjFlN13g7BR.js";import{ut as t}from"./B603vO-13smUKN.js";import{t as n}from"./Czpn1I533HBrwJ.js";function r(e,t,n){let r=[];if(e.blocks)for(let t of e.blocks)for(let e of t.paragraphs)for(let t of e.lines)for(let e of t.words){let n={text:e.text,box:i(e.bbox),cf:e.confidence/100};e.font_name&&(n.font={size:a(t.bbox),family:e.font_name}),r.push(n)}return{size:t,page:n,items:r}}function i(e){return{x:e.x0,y:e.y0,w:e.x1-e.x0,h:e.y1-e.y0}}function a(e){return e.y1-e.y0}var o=t(`ocr:worker`),s,c,l={};function u(e){l={...l,...e}}async function d(t={}){let r=t.lang??`deu+eng`;if(s&&c===r)return s;if(s)return o(`reinitializing worker for language change`,c,`->`,r),await s.reinitialize(r),c=r,s;let i={...l,...t.workerOptions};o(`creating worker for`,r);let{createWorker:a}=await n(async()=>{let{createWorker:t}=await import(`./DWshPLuy3RQbKF.js`).then(t=>e(t.default,1));return{createWorker:t}},__vite__mapDeps([0,1,2]));return s=await a(r,void 0,i),c=r,s}var f=t(`ocr`),p;function m(e){p=e}async function h(e,t,n={}){if(p){let r=await p(e,t,n);return r.size??=t,n.dpi&&(r.dpi??=n.dpi),r}let i=await d(n);f(`recognizing image`,t.w,`x`,t.h);let a=r((await i.recognize(e,void 0,{blocks:!0})).data,t);return n.dpi&&(a.dpi=n.dpi),a}export{m as n,u as r,h as t};